﻿using Windows.UI.Xaml.Controls;
using XamlInspector.Foundation;
using XamlInspector.Presentation;
using XamlInspector.Presentation.Controls;

namespace XamlInspector
{
    public class Client
    {
        public static void Run()
        {
            var mainViewModel = DependencyContainer.Instance.Resolve<MainViewModel>();
            var inspectorWindow = new InspectorWindow { DataContext = mainViewModel };

            var launcher = new LauncherControl();
            launcher.ExpandInspector += (s, e) =>
                                        {
                                            var window = new OverlayWindow { Content = inspectorWindow, Width = 800, Height = 600 };
                                            window.Show();                                
                                        };
            launcher.Show();
            
        }

    }
}
